package com.tutorial.service.impl;

import com.tutorial.dao.UserDao;
import com.tutorial.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;

/**
 * 注解实现服务层接口
 *
 * @ClassName UserServiceImpl_annotation
 * @Description 注解实现服务层接口
 * @Author G
 * @Date 2025/3/4 16:17
 */
@Service(value = "userServiceImplAnnotation1")
@Order(value = 1)
public class UserServiceImpl_annotation1 implements UserService {
    public UserServiceImpl_annotation1() {
        System.out.println("UserServiceImpl_annotation1");
    }

    @Autowired
    @Qualifier(value = "userDaoImplAnnotation")
    private UserDao userDao;

    @Override
    public void save() {
        System.out.println("UserServiceImpl_annotation1.save");
        userDao.save();
    }
}
